import {createApp} from 'vue'
//@ts-ignore
import App from './App.vue'
//引入element-plus
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
//设置element-plus国际化
//@ts-ignore
import zhCn from "element-plus/dist/locale/zh-cn.mjs"
//导入svg的配置项
import 'virtual:svg-icons-register'
//引入模板全局样式
import './styles/reset.scss'
//引入自定义插件
import globalComponents from './utils/registerComponents.ts'
//引入路由进行注册
import router from "./router/routerConfig.ts";
//引入仓库
import pinia from "./piniaStore/rootStore.ts";
//引入路由鉴权文件
import "./permission.ts"
//引入暗黑模式
import 'element-plus/theme-chalk/dark/css-vars.css'


//获取应用实例对象
let app = createApp(App);

app.use(ElementPlus, {
    locale: zhCn
});//安装ElementPlus
app.use(globalComponents);//注册全局组件
app.use(router);//注册路由
app.use(pinia);//安装大仓库

//挂载
app.mount('#app');
